package com.atguigu.gulimall.order;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@EnableDiscoveryClient
@EnableRabbit
@EnableRedisHttpSession
@EnableFeignClients
/**
 * 本地事务事务传播引入spring-boot-starter-aop 开启 aspect动态代理以后所有的动态带代理都是它创建的即使没有没有接口也可以创建代理
 * 分布式事务
 * 使用seat首先需要将数据库添加undo_log表
 * 安装seta服务器
 * 解压seata-server修改registry type=nacos
 * 使用DataSourceProxy代理自己的数据源
 * 每个微服务都必须啊导入registry file.conf
 * 修改file.conf   vgroup_mapping.gulimall-order-fescar-service-group = "default"
 * 给分布式口标注@GlobalTransational
 * 给远程标注@Transation
 */
@EnableAspectJAutoProxy(exposeProxy = true)
public class GulimallOrderApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimallOrderApplication.class, args);
    }

}
